# -*- coding:utf-8 -*-
# __author__ : "张百科"
# Date: 2021/1/25 17:19
# File: marketing.py
# IDE: PyCharm
from django.db import models
from utils.common import prefix

class Marketing(models.Model):
    id = models.AutoField(db_column='ID', primary_key=True)  # Field name made lowercase.
    title = models.CharField(max_length=50)
    index_image_url = models.CharField(max_length=10, blank=True, null=True)
    description = models.TextField()
    start_time = models.DateTimeField()
    end_time = models.DateTimeField()
    sort = models.IntegerField(default=1)
    is_enable = models.IntegerField(default=1)
    read_count = models.IntegerField(default=0)
    is_delete = models.IntegerField(default=0)
    update_time = models.DateTimeField(auto_now=True)

    class Meta:
        managed = False
        db_table = prefix+'marketing'